<template>
  <el-dropdown @command="handleDepartChange">
    <div>
      <span class="depart-name">北京烟雨公司</span>
      <el-icon>
        <ArrowDown />
      </el-icon>
    </div>
    <template #dropdown>
      <el-dropdown-menu>
        <el-dropdown-item command="北京烟雨公司1">北京烟雨公司1</el-dropdown-item>
        <el-dropdown-item command="北京烟雨公司2">北京烟雨公司2</el-dropdown-item>
      </el-dropdown-menu>
    </template>
  </el-dropdown>
</template>



<script lang="ts" setup>
import { ArrowDown } from "@element-plus/icons-vue";
import { defineComponent, DefineComponent, onMounted, defineEmits } from "vue";
defineComponent<DefineComponent>({
  ArrowDown,
});


const emit = defineEmits(["departChange"])

onMounted(() => {
  // 组件挂在请求
})

function handleDepartChange(command: string) {
  emit("departChange")
}
</script>


<style lang="less" scoped>
.depart-name {
  font-size: 18px;
  cursor: pointer;
  color: #2d5368;
  margin-right: 10px;
  vertical-align: bottom;
}
</style>